Repository navigation
feat: add offline categorical judge consistency analysis - #270
Open
Cookie0103 wants to merge 1 commit into
Open
Cookie0103 wants to merge 1 commit into
Cookie0103 wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repeated judge runs can have nearly identical average scores while disagreeing on individual cases. This adds an offline Python/TypeScript analysis API for a single categorical criterion, addressing the agreement-analysis use case in #219. The input is an explicit case/rater panel or native AutoEvals Scores converted with an exact, user-supplied score-to-category mapping.
The report distinguishes equal-case raw agreement, complete-panel Fleiss kappa, missing-data nominal Krippendorff alpha, and overlap-only pairwise Cohen kappa. Every statistic carries its supporting cohort and undefined reason. An expected-case manifest retains wholly absent cases; errors, skipped ratings and absent cells have separate coverage counts. Strict-majority consensus uses the declared panel, and optional reference accuracy remains separate from consistency.
Named case groups and explicit observed-benchmark requirements can be evaluated without allowing missing evidence to become a pass. Optional seeded whole-case bootstrap intervals are marginal diagnostics only; undefined or degenerate resampling is reported rather than silently discarded. Shared numerical accumulation and threshold-boundary fixtures keep Python and TypeScript verdicts aligned.
The module also includes bounded versioned input bundles for offline replay, JSON/Markdown report exports, native bounded Score summaries, and work/size limits checked before expensive allocations. Provider metadata and error messages are excluded from selected observations. Full case-level report metadata is opt-in. Existing scorers, dependencies, package versions and provider behavior are unchanged.
Usage and statistical interpretation are in
docs/JUDGE_CONSISTENCY.md, with runnable credential-free examples in both languages. This is an analysis utility, not a model scheduler or a claim that agreement proves correctness.Validation:
tsc --noEmitretains the same existingjs/render-messages.test.ts:227type error reproduced on the base; declaration builds pass.AI-assisted implementation and tests. An independent AI code review found and verified fixes for numerical boundary parity, literal Markdown labels and empty-group work accounting; its follow-up reported no remaining Critical/Important findings. Maintainer review of the proposed public API and statistical scope is welcome.